package com.sea.demo.shiro.form;

import java.util.Objects;

/**
 * @Author: 快乐在角落里
 * @Create: 2020/11/8 2:30
 * 用户相关表单对象
 */
public class UserForm {

    private Integer id;
    private String username;/** 用户名 */
    private String password;/** 密码 */
    private String name;/** 姓名 */
    private String avatar;/** 头像 */
    private String description;/** 描述 */
    private Integer state;/** 状态 */
    private Integer currentPage;
    private Integer pageSize;

    public UserForm() {
    }

    public UserForm(Integer id, String username, String password, String name, String avatar, String description, Integer state, Integer currentPage, Integer pageSize) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.name = name;
        this.avatar = avatar;
        this.description = description;
        this.state = state;
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "UserForm{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", avatar='" + avatar + '\'' +
                ", description='" + description + '\'' +
                ", state=" + state +
                ", currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserForm userForm = (UserForm) o;
        return Objects.equals(id, userForm.id) &&
                Objects.equals(username, userForm.username) &&
                Objects.equals(password, userForm.password) &&
                Objects.equals(name, userForm.name) &&
                Objects.equals(avatar, userForm.avatar) &&
                Objects.equals(description, userForm.description) &&
                Objects.equals(state, userForm.state) &&
                Objects.equals(currentPage, userForm.currentPage) &&
                Objects.equals(pageSize, userForm.pageSize);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, username, password, name, avatar, description, state, currentPage, pageSize);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}
